class Fish{
    int weight = 1;
}
class Lake{
    Fish fish;
    void setFish(Fish s){
	fish = s;
    }
    void foodFish(int m){
	fish.weight = fish.weight+m;
    }
}
public class E2{
    public static void main(String x[]){
	Fish r=new Fish();
	System.out.println(r.weight);
	Lake l = new Lake();
	l.setFish(r);
	l.foodFish(120);
	System.out.println(r.weight);
	System.out.println(l.fish.weight);
    }
} 